package com.yanqu.road.server.channelserver.cmd.activity.tonbing;

import com.yanqu.road.message.YanQuMessage;
import com.yanqu.road.pb.activity.ChannelTonBingProto;
import com.yanqu.road.server.channelserver.manager.activity.tonbing.ChannelTonBingMgr;
import com.yanqu.road.server.channelserver.manager.activity.tonbing.activity.ChannelTonBingActivity;
import com.yanqu.road.server.cmd.CrossChannelCommand;
import com.yanqu.road.server.command.Cmd;
import com.yanqu.road.server.protocol.ChannelProtocol;

@Cmd(code = ChannelProtocol.N_TON_BING_CITY_WINNER_APPOINT, desc = "")
public class ChannelTonBingCityWinnerAppointCmd extends CrossChannelCommand {

    @Override
    public boolean parseData(YanQuMessage packet) throws Exception {
        ChannelTonBingProto.ChannelTonBingCityWinerAppointReqMsg reqMsg = ChannelTonBingProto.ChannelTonBingCityWinerAppointReqMsg.parseFrom(packet.getBytes());
        ChannelTonBingActivity activity = ChannelTonBingMgr.getActivity(reqMsg.getActivityId());
        activity.cityWinnerAppointPosition(packet.getPlayerId(), reqMsg);
        return true;
    }

    @Override
    public void execute(YanQuMessage packet) throws Exception {

    }

    @Override
    public void sendData() {

    }
}
